package
{
	import com.tile.gemo.BGtile;
	import com.tile.gemo.Console;
	import com.tile.gemo.Util;
	
	import flash.display.Sprite;
	import flash.display.StageAlign;
	import flash.display.StageScaleMode;
	import flash.events.MouseEvent;
	import flash.geom.Point;
	import flash.text.TextField;
	import flash.utils.getTimer;
	
	public class TileStar extends Sprite
	{
		public function TileStar()
		{
			stage.scaleMode = StageScaleMode.NO_SCALE;
			stage.align = StageAlign.TOP_LEFT;
			init();
		}
		
		private function init():void{
			this.addChild(new BGtile);
			this.addChild(Console.getInstance());
			Console.getInstance().y = 500;
			stage.addEventListener(MouseEvent.CLICK,onStageClick);
		}
		
		private function onStageClick(event:MouseEvent):void{
			var p:Point = Util.getTilePoint(event.stageX,event.stageY);
			Console.getInstance().show("(" + p.x + "," + p.y + ")");
		}
		
		
		
	}
}